package com.qianbao.service.order;

import com.qianbao.components.excepion.CommonException;
import com.qianbao.domain.order.OrderEntity;

import java.util.List;

public interface OrderService {

    /**
     * 根据状态查询用户的所有订单
     * @param orderState
     * @param customId
     * @return
     * @throws CommonException
     */
    public List<OrderEntity> findOrderWithOrderStateCustomId(String orderState, String customId) throws CommonException;

    /**
     * 保存用户的订单
     * @param entity
     * @return
     * @throws CommonException
     */
    public void saveOrder(OrderEntity entity) throws CommonException;


    /**
     * 更新订单状态
     * @param orderId
     * @param state
     * @throws CommonException
     */
    public void updateOrderState(String orderId,String state) throws CommonException;

}
